package com.lc.afbx.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.lc.afbx.R;
import com.lc.afbx.adapters.LiPeiSXAdapter;
import com.lc.afbx.conn.GetApiLiPeiResult;
import com.lc.afbx.util.PrefrenceConfig;
import com.zcx.helper.bound.BoundView;

import cn.trinea.android.common.util.ToastUtils;

/**
 * Created by Administrator on 2016/5/23.
 */
public class InsuranceSearchLifeResultActivity extends BaseActivity implements View.OnClickListener {

    @BoundView(R.id.back) private RelativeLayout back;
    @BoundView(R.id.listResult_sx) private ListView listResult;
    @BoundView(R.id.count_lipei_sx) private TextView count_lipei_sx;

    private LiPeiSXAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shouye_lipeichaxun_shouxianlipei);

        GetApiLiPeiResult.SearchInfo info = (GetApiLiPeiResult.SearchInfo) getIntent().getExtras().getSerializable("entityList");

        count_lipei_sx.setText("出险次数：" + info.count + "次");

        listResult.setAdapter(adapter = new LiPeiSXAdapter(context, info.enetiyLists));

        back.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {

        switch (view.getId()) {

            case R.id.back:
                finish();
                return;
        }

    }


}
